home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10329 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  43 lines

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: HELP! Modifying the EOF in a file!
  5. Date: Sat, 16 Mar 96 20:57:40 GMT
  6. Organization: none
  7. Message-ID: <827009860snz@genesis.demon.co.uk>
  8. References: <4i585k$4ia@news.netam.net> <4i5pb4$fae@sparcserver.lrz-muenchen.de> <1996Mar14.122030.9220@friend.kastle.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <1996Mar14.122030.9220@friend.kastle.com>
  15.            rich@kastle.com "Richard Krehbiel" writes:
  16.  
  17. >ua302aa@lrz-muenchen.de () wrote:
  18. >
  19. >>bgc@alpha.netam.net (The Bowling Green Connection) writes:
  20. >
  21. >>>I am having trouble shortening the size of a text file...
  22. >>>Suppose I have a text file with 3 lines of data, then I
  23. >>>run this program:
  24. >
  25. >>>void main() {
  26. >
  27. >>Next to no comment :-)
  28. >
  29. >Okay, I'll say it:  No one should declare void main() and fail to
  30. >return a valid result code to the execution environment, no matter how
  31. >successfully the program compiles or runs.
  32.  
  33. The point is that the program start-up code is only guaranteed to be able
  34. to call correctly a main function compatible with int main(void) or
  35. int main(int , char *[]). If you define your main function as returning
  36. void there is no guarantee that your program can be run at all.
  37.  
  38. -- 
  39. -----------------------------------------
  40. Lawrence Kirby | fred@genesis.demon.co.uk
  41. Wilts, England | 70734.126@compuserve.com
  42. -----------------------------------------
  43.